(function () {
    'use strict';

    angular.module('vehicleCheckApp').controller('ChecklistResultCtrl', ChecklistResultCtrl);

    function ChecklistResultCtrl($scope, $state, $stateParams,_DBSerive) {
        console.log($stateParams);
        
		$scope.resultText = $stateParams.resultText;
		$scope.resultTextCss = $stateParams.resultTextCss;

        _DBSerive.queryNotSubmitList(localStorage.actno).then(function(result){
            if(result.rows.length > 0 && result.rows.item(0).notSubmitLists.length > 0){
                var notSubmitLists = JSON.parse(result.rows.item(0).notSubmitLists);
                $scope.notSubmitNum = notSubmitLists.length;
            }
        });


		
        $scope.goOnCheck= function(){
			$state.go("vehicleCheck");
        }

        $scope.goPendingList= function(){
			$state.go("pendinglist", {revise:false});
        } 

    };
})();